<template>
    <div class="plist">
        <list-item
            v-for="item in list"
            :key="item.id"
            :image="filterText(item.imgurl)"
            :name="item.specialname"
            :path="`/plist/list/${item.specialid}`"
        />
    </div>
</template>

<script>
import ListItem from 'Components/ListItem'
import { getSongList } from 'Api/song'
export default {
    name: 'Plist',
    components: {
        ListItem
    },
    data () {
        return {
            list: []
        }
    },
    async beforeCreate () {
        const data = await getSongList()
        this.list = data.plist.list.info
    },
    methods: {
        filterText (path) {
            return path.replace('{size}', '400')
        }
    }
}
</script>
